#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
检查大乐透相关文件是否存在
"""

import os

def check_dlt_files():
    """检查大乐透相关文件"""
    base_dir = os.path.dirname(os.path.abspath(__file__))
    
    # 定义文件路径
    files_to_check = {
        "增强版LSTM-CRF模型": os.path.join(base_dir, 'scripts', 'dlt', 'enhanced_lstm_crf_model.pth'),
        "基础LSTM模型": os.path.join(base_dir, 'scripts', 'dlt', 'dlt_model.pth'),
        "历史数据": os.path.join(base_dir, 'scripts', 'dlt', 'dlt_history.csv')
    }
    
    print("大乐透文件检查结果:")
    print("=" * 50)
    
    for name, path in files_to_check.items():
        exists = os.path.exists(path)
        status = "✅ 存在" if exists else "❌ 不存在"
        print(f"{name}: {status}")
        print(f"  路径: {path}")
        if exists:
            try:
                size = os.path.getsize(path)
                print(f"  大小: {size} 字节")
            except Exception as e:
                print(f"  大小: 无法获取 ({e})")
        print()

def check_ssq_files():
    """检查双色球相关文件"""
    base_dir = os.path.dirname(os.path.abspath(__file__))
    
    # 定义文件路径
    files_to_check = {
        "增强版LSTM-CRF模型": os.path.join(base_dir, 'scripts', 'ssq', 'enhanced_lstm_crf_model.pth'),
        "基础LSTM模型": os.path.join(base_dir, 'scripts', 'ssq', 'ssq_model.pth'),
        "历史数据": os.path.join(base_dir, 'scripts', 'ssq', 'ssq_history.csv')
    }
    
    print("双色球文件检查结果:")
    print("=" * 50)
    
    for name, path in files_to_check.items():
        exists = os.path.exists(path)
        status = "✅ 存在" if exists else "❌ 不存在"
        print(f"{name}: {status}")
        print(f"  路径: {path}")
        if exists:
            try:
                size = os.path.getsize(path)
                print(f"  大小: {size} 字节")
            except Exception as e:
                print(f"  大小: 无法获取 ({e})")
        print()

if __name__ == "__main__":
    check_dlt_files()
    print()
    check_ssq_files()